package com.zbkj.crmeb.chant.model;

import java.math.BigDecimal;

import com.baomidou.mybatisplus.annotation.TableField;
import com.baomidou.mybatisplus.annotation.TableName;
import com.baomidou.mybatisplus.annotation.IdType;
import com.baomidou.mybatisplus.extension.activerecord.Model;
import java.util.Date;
import com.baomidou.mybatisplus.annotation.TableId;
import java.io.Serializable;
import io.swagger.annotations.ApiModel;
import io.swagger.annotations.ApiModelProperty;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * <p>
 * 商户分销模式表
 * </p>
 *
 * @author wuzp
 * @since 2022-04-01
 */
@Data
@EqualsAndHashCode(callSuper = false)
@TableName("eb_channel_merchant_distribution")
@ApiModel(value="ChannelMerchantDistribution对象", description="商户分销模式表")
public class ChannelMerchantDistribution extends Model<ChannelMerchantDistribution> {

    private static final long serialVersionUID = 1L;

    @ApiModelProperty(value = "id")
    @TableId(value = "id", type = IdType.AUTO)
    private Integer id;

    @ApiModelProperty(value = "商户id")
    private Integer merId;

    @ApiModelProperty(value = "分销模式（1人人分销  2指定订单数分销  3指定金额分销）")
    private Integer model;

    @ApiModelProperty(value = "适用商品（1全部商品, 2指定条件, 3指定商品）")
    private Integer applyType;

    @ApiModelProperty(value = "指定条件（json对象: 分类, 品牌, 发货地, 季节）")
    private String specifyConditions;

    @ApiModelProperty(value = "指定商品")
    private String specifyGoods;

    @ApiModelProperty(value = "达成条件（金额/订单数）")
    @TableField(value = "`condition`")
    private BigDecimal condition;

    @ApiModelProperty(value = "一级返佣比例")
    private BigDecimal oneRebateRate;

    @ApiModelProperty(value = "二级返佣比例")
    private BigDecimal twoRebateRate;

    @ApiModelProperty(value = "兜底返佣比例")
    private BigDecimal baseRebateRate;

    @ApiModelProperty(value = "提现最低金额")
    private BigDecimal minPrice;

    @ApiModelProperty(value = "创建时间")
    private Date createTime;

    @ApiModelProperty(value = "更新时间")
    private Date updateTime;


    @Override
    protected Serializable pkVal() {
        return this.id;
    }

}
